"use strict";

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.addColumn("Attachments", "type", {
      type: Sequelize.STRING,
    });
    await queryInterface.addColumn("Attachments", "tag", {
      type: Sequelize.STRING,
    });

    await queryInterface.addIndex("Attachments", ["type"]);
    await queryInterface.addIndex("Attachments", ["tag"]);
  },

  async down(queryInterface, Sequelize) {
    await queryInterface.removeColumn("Attachments", "type");
    await queryInterface.removeColumn("Attachments", "tag");
  },
};
